import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import BaseComponent from "../components/Base.vue";

export const routes: RouteRecordRaw[] = [
  {
    path: "/base",
    component: BaseComponent,
    name: "基础地球",
  },
  {
    path: "/draw",
    component: () => import("../components/Draw.vue"),
    name: "图形绘制",
  },
  {
    path: "/draw2",
    component: () => import("../components/Draw2.vue"),
    name: "图形绘制(重构)",
  },
  {
    path: "/flex",
    component: () => import("../components/Flex.vue"),
    name: "Flex布局",
  },
  {
    path: "/CarRoaming",
    component: () => import("../components/Car.vue"),
    name: "汽车漫游",
  },
  {
    path: "/primitives",
    component: () => import("../components/Primitives.vue"),
    name: "Primitives",
  },
  {
    path: "/frustum",
    component: () => import("../components/Frustum.vue"),
    name: "Frustum",
  },
  {
    path: "/shader",
    component: () => import("../components/Shader.vue"),
    name: "Shader",
  },
];

export const router = createRouter({
  routes,
  history: createWebHistory(),
});
